package com.webchat.act.service;


import com.webchat.act.repository.entity.ResourceBehaviorEntity;
import com.webchat.common.constants.ResourceBehaviorConstants;
import org.springframework.stereotype.Service;

@Service
public class OneWayResourceBehaviorService extends AbstractResourceBehaviorService {



    @Override
    protected boolean doBehavior(String userId, String resourceType, Long resourceId) {

        ResourceBehaviorEntity resourceBehavior = new ResourceBehaviorEntity();

        resourceBehavior.setUserId(userId);
        resourceBehavior.setBehaviorType(super.behaviorType);
        resourceBehavior.setResourceType(resourceType);
        resourceBehavior.setResourceIndex(resourceId);
        resourceBehavior.setStatus(true);
        super.resourceBehaviorDAO.save(resourceBehavior);
        return true;
    }
}
